package com.lu.api.wemedia;

import com.lu.model.admin.dto.NewsAuthDto;
import com.lu.model.admin.dto.SensitiveDto;
import com.lu.model.admin.pojo.AdChannel;
import com.lu.model.admin.pojo.AdSensitive;
import com.lu.model.common.dtos.ResponseResult;
import com.lu.model.wemedia.dto.ChannelDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

//文章feign接口
@FeignClient(value = "news-wemedia")
public interface IWemediaClient {


    /**
     * 敏感词删除
     * @param id
     * @return
     */
    @DeleteMapping("/api/v1/sensitive/del/{id}")
    public ResponseResult remove(@PathVariable("id") Integer id);

    /**
     * 敏感词列表
     * @return
     */
    @PostMapping("/api/v1/sensitive/list")
    public ResponseResult list(@RequestBody SensitiveDto dto);


    /**
     * 保存敏感词
     * @param adSensitive
     * @return
     */
    @PostMapping("/api/v1/sensitive/save")
    public ResponseResult save(@RequestBody AdSensitive adSensitive);

    /**
     * 修改铭感词
     * @param adSensitive
     * @return
     */
    @PostMapping("/api/v1/sensitive/update")
    public ResponseResult update(@RequestBody AdSensitive adSensitive);


    /**
     * 查询频道列表
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/channel/list")
    ResponseResult channelList(@RequestBody ChannelDto dto);


    /**
     * 删除频道
     * @param id
     * @return
     */
    @GetMapping("/api/v1/channel/del/{id}")
    ResponseResult removeChannel(@PathVariable("id") Integer id);


    /**
     * 保存频道
     * @param adChannel
     * @return
     */
    @PostMapping("/api/v1/channel/save")
    ResponseResult saveChannel(@RequestBody AdChannel adChannel);


    /**
     * 修改频道
     * @param adChannel
     * @return
     */
    @PostMapping("/api/v1/channel/update")
    ResponseResult updateChannel(@RequestBody AdChannel adChannel);


    /**
     * 文章人工审核
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/news/list_vo")
    ResponseResult artificialExamine(@RequestBody NewsAuthDto dto);


    /**
     *查询人工审核文章的详情
     * @param id
     * @return
     */
    @GetMapping("/api/v1/news/one_vo/{id}")
    ResponseResult findArticle(@PathVariable("id") Integer id);


    /**
     * 人工审核失败
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/news/auth_fail")
    ResponseResult examineFail(@RequestBody NewsAuthDto dto);


    /**
     * 人工审核成功
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/news/auth_pass")
    ResponseResult examineSuccess(@RequestBody NewsAuthDto dto);

}
